<?php 
	$_SESSION['id_serveur'] = $id_serveur;
	slot('title', 'table client');
	use_stylesheet('tableClient.css');
	$url = '<a href="serveur/index"><img src="/ProjetBar/web/images/retour.png" width="50"/></a>';
	slot('retour',$url);
?>


<table>
  <tbody>
	<tr height='50'>
    <?php
	  $cpt=0;
	  foreach ($table_clients as $table_client): 
	?>
	  <td width='200' >
		  <a href="<?php echo url_for('commandeClient/commandesParTable/show?id_table_client='.$table_client->getIdTableClient()) ?>">
		  <?php echo 'Table '.$table_client->getIdTableClient() ?></a>
		  <?php 
			foreach($produit_commande_table_client_prets as $produit_commande_table_client_pret):
			if($produit_commande_table_client_pret['id_table_client'] == $table_client->getIdTableClient())
			  if($produit_commande_table_client_pret['nb_produit_pret'] > 0) {
		  ?>
			<a href="<?php  echo url_for('commandeClient/show?id_commande_client='.$produit_commande_table_client_pret['id_commande_client'])  ?>">
			<!--<a href="<?php /* echo url_for('commandeClient/show?id_commande_client='.$commande_client->getIdCommandeClient()) */ ?>"> -->
			  <img src='/ProjetBar/web/images/icone_alerte.gif' alt='' height='15' width='15'/>
			</a>
		  <?php 
			} 
			endforeach;
		  ?>
	  </td>
	  
	<?php $cpt++; if($cpt % 4 == 0) { ?>
		</tr>
		<tr height='50'>
    <?php } endforeach; ?>
	<tr>
		<td id="new" colspan="4"><a href="<?php echo url_for('TableClient/new?id_serveur='.$id_serveur) ?>">Nouvelle table</a></td>
	</tr>
  </tbody>
</table>

  